import request from '../../utils/request';

// 专业领域管理相关 API

// 更新专业领域
export const updateExpertiseDomain = (data: any) => {
    return request({
        url: '/system/api/expertise-domain/update',
        method: 'put',
        data
    });
};

// 分页查询专业领域
export const getExpertiseDomainPage = (params: any) => {
    return request({
        url: '/system/api/expertise-domain/page',
        method: 'get',
        params
    });
};

// 创建专业领域
export const createExpertiseDomain = (data: any) => {
    return request({
        url: '/system/api/expertise-domain/create',
        method: 'post',
        data
    });
};

// 获取启用的专业领域
export const getEnabledExpertiseDomains = () => {
    return request({
        url: '/system/api/expertise-domain/enabled',
        method: 'get'
    });
};

// 获取专业领域详情
export const getExpertiseDomainDetail = (id: string) => {
    return request({
        url: `/system/api/expertise-domain/detail/${id}`,
        method: 'get'
    });
};

// 删除专业领域
export const deleteExpertiseDomain = (id: string) => {
    return request({
        url: `/system/api/expertise-domain/delete/${id}`,
        method: 'delete'
    });
};
